/**
 * 车辆排队 api
 * @author xiaoxujs
 */

import { basicIp, newHttpService } from "../../api/http"
import { IBaseSortAddParams, IBaseSortGetInfoParams, IBaseSortSortParams, IBaseSortUpdateParams } from "../../type/cheliangpaidui";

//   排队登记 
export const postBaseSortAdd = (data: IBaseSortAddParams ) => {
    const url = basicIp + '/base/sort/add';
    return newHttpService.postData(url, data)
}
// 车辆排序
export const postBaseSortSort = (data: IBaseSortSortParams) => {
    const url = basicIp + '/base/sort/sort';
    return newHttpService.postData(url, data)
}
//   查询车辆排队信息
export const postBaseSortGetInfo = (data: IBaseSortGetInfoParams) => {
    const url = basicIp  + '/base/sort/getInfo';
    return newHttpService.postData(url, data)
}
// 呼叫下一辆车
export const getBaseSortNext = (data: {laneId: string}) => {
    const url = basicIp + '/base/sort/next';
    return newHttpService.getData(url, data)
}
//  修改车辆排队数据
export const postBaseSortUpdate = (data: IBaseSortUpdateParams) => {
    const url = basicIp + '/base/sort/update';
    return newHttpService.postData(url, data)
}
// 获取排队开关信息
export const postBaseSortGetPdSet = () => {
    const url = basicIp + '/base/sort/getPdSet';
    return newHttpService.postData(url)
}
// 设置排队开关信息
export const getBaseSortSetPdSet = (data: {isSwitch: 0 | 1}) => {
    const url = basicIp + '/base/sort/setPdSet';
    return newHttpService.getData(url, data)
}

